var fs=require('fs');
var path=require('path');

var filePath=path.join(__dirname,'/2.txt');

//创建可写流
var writable=fs.createWriteStream(filePath);
//以可写流的方式向文件写入内容
writable.write('hello world');
writable.end();
